import path from "path";
import { Request, Response } from "express";
import { sequelize } from "../db";

export default {
  "POST /api/sync": async (req: Request, res: Response) => {
    try {
      await sequelize.sync({ alter: true });
      res.send({
        success: true,
        data: null,
      });
    } catch (error: any) {
      res.send({
        success: false,
        data: error.toString(),
      });
    }
  },
};
